/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.service;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.bo.ExaminationPaperQuestionBO;
import com.xy.biz.ts.domain.bo.ExaminationPaperRuleBO;
import com.xy.biz.ts.domain.req.GetExaminationPaperStatusRequest;
import com.xy.biz.ts.domain.req.SaveExaminationPaperQuestionRequest;
import com.xy.biz.ts.domain.req.examinationPaper.GetExaminationPaperRequest;
import com.xy.biz.ts.domain.resp.GetExaminationPaperResponse;
import com.xy.biz.ts.domain.resp.GetFixedTotalQuestionAndScoreResponse;
import com.xy.biz.ts.domain.resp.PreviewExaminationPaperResponse;
import com.xy.lang.domain.Result;
import com.xy.biz.ts.domain.bo.ExaminationPaperBO;
import com.xy.biz.ts.domain.query.ExaminationPaperQuery;

/**
 *
 *
 * @author wcs
 * @date 2021-3-8
 */
public interface ExaminationPaperService {

    /**
     * 固定试题
     */
    Result<?> saveFixedExaminationPaper(ExaminationPaperBO examinationPaperBO);

    /**
     * 随机试题
     */
    Result<?> saveRandomExaminationPaper(ExaminationPaperBO examinationPaperBO);


    /**
     * 保存多个
     *
     * @param collection
     */
    Result<?> saveAllExaminationPaper(Collection<ExaminationPaperBO> collection);


    Result<?> saveExaminationPaperRule(Collection<ExaminationPaperRuleBO> toBO);

    Result<?> saveExaminationPaperQuestion(Collection<ExaminationPaperQuestionBO> toBO);

    Result<?> saveExaminationPaperQuestion(ExaminationPaperQuestionBO examinationPaperQuestionBO);

    /**
     * 更新
     *
     * @param examinationPaperBO
     */
    Result<?> updateExaminationPaper(ExaminationPaperBO examinationPaperBO);

    /**
     * 删除
     *
     * @param examinationPaperId
     */
    Result<?> deleteExaminationPaper(Long examinationPaperId);

    /**
     * 查找一个
     *
     * @param examinationPaperId
     * @return
     */
    ExaminationPaperBO getExaminationPaper(Long examinationPaperId);

    /**
     * 查找多个
     *
     * @param query 查找条件
     */
    List<ExaminationPaperBO> listExaminationPaper(ExaminationPaperQuery query);

    /**
     * 统计个数
     *
     * @param query 查找条件
     */
    int countExaminationPaper(ExaminationPaperQuery query);

    /**
     * 种类查找
     * @param request
     * @return
     */
    GetExaminationPaperResponse getFixedExaminationPaper(GetExaminationPaperRequest request);

    GetExaminationPaperResponse getRandomExaminationPaper(GetExaminationPaperRequest request);

    Result<?> updateStatusExaminationPaper(GetExaminationPaperStatusRequest request);

    Result<?> deleteRuleExaminationPaper(Long examinationPaperId);

    GetFixedTotalQuestionAndScoreResponse getFixedTotalQuestionAndScore(Long examinationPaperId);

    PreviewExaminationPaperResponse previewExaminationPaper(Long examinationPaperId);

    Result<?> deleteExaminationPaperQuestionSingle(ExaminationPaperQuestionBO toBO);

    Result<?> generateRandomExaminationPaper(Long examinationPaperId);

    Result<?> deleteExaminationPaperMultiple(Collection<Long> collection);
}
